package edu.sctu.practice.class02.zengguangchuan.assign03.test2;

/**
 * Created by lenovo0 on 2015/10/29.
 */
public class ComparableCircle extends Circle implements Comparable {
    public int area = 0;

    public ComparableCircle(int r) {
        super(r);
    }

    @Override
    public int compareTo(Object o) {
        area = (int) Math.PI*r*r;
        System.out.println("圆面积："+area);
        return area;
    }
}
